package cn.accp.mvc.controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.accp.mvc.entity.User;

@Controller
public class JsonController {
	@RequestMapping("/json")
	@ResponseBody
	public List<User> json(){
		System.out.println("----json-------");
		List<User> users = new ArrayList<User>();
		users.add(new User(1,"maizi","123"));
		users.add(new User(2,"mai","123"));
		return users;
	}
	
}
